package com.evzgaga.evzrecon.xmlrpc.client;

import com.evzgaga.evzrecon.event.GbxWriterListener;
import org.apache.ws.commons.serialize.CharSetXMLWriter;
import org.xml.sax.SAXException;

/**
 *
 * @author Bastien
 */
public class GbxXmlWriter extends CharSetXMLWriter {
    private GbxWriterListener documentListener;

    @Override
    public void endDocument() throws SAXException {
        super.endDocument();
        documentListener.onDocumentEnded(getWriter().toString());
    }
    
    public void setGbxDocumentListener(GbxWriterListener listener) {
        documentListener = listener;
    }
}